<template>
  <div style='display: flex;justify-content: center;align-items: center;'>
    <div style='display: grid;grid-template-columns: 1fr 1fr;grid-gap: 20px;width: 600px;'>
      <img v-for='item of list' :key='item.id' :src="item.img || 'http://124.221.121.107:2604/storage/20221017/634d80e15265b.png'" style='width: 100%;border-radius: 20px;' />
    </div>
  </div>
</template>

<script>
export default ({
  name: 'Index',
  data () {
    return {
      list: []
    }
  },
  mounted () {
    this.init()
  },
  methods: {
    async init () {
      const res = await this.$http.get('api/getIndex')
      if (res.code === 0) {
        this.list = res.data
      }
    }
  }
})
</script>

<style scoped lang='stylus'>

</style>
